package com.xuecheng.order.service;

import com.xuecheng.commons.model.dto.MyOrdersDto;
import com.xuecheng.commons.model.dto.OrderDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.order.domain.Orders;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.IOException;
import java.util.Date;
import java.util.Map;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-08-10
 */
public interface OrdersService extends IService<Orders> {

    // 用户下单
    ResponseResult createOrder(Long coursePubId);

    // 查询支付结果
    ResponseResult findPay(String orderNo);

    // 清理超时订单
    void clearOrders();

    // 个人中心用户订单
    ResponseResult myOrder(PageRequest request, MyOrdersDto dto) throws IOException;

    //机构的订单列表及明细 分页查询
    ResponseResult orderlist(PageRequest param, OrderDto dto, Date startTime, Date endTime);


    //订单明细写入execl
    ResponseResult execl(Long companyId);
}
